import request from './index'
// 日活跃数
export const getDay = (data = {}) => {
  return request.get('/statistic/dau', {
    params: {
      startDate: data.startDate,
      endDate: data.endDate,
    },
  })
}
// 月活跃数
export const getMonth = (data = {}) => {
  return request.get('/statistic/mau', {
    params: {
      startMonth: data.startMonth,
      endMonth: data.endMonth,
    },
  })
}
// 留存率
export const getRetention = (data = {}) => {
  return request.get('/statistic/retention', {
    params: {
      date: data.date,
      daysAfter: data.daysAfter,
    },
  })
}
// 查询关键词
export const getTopKeywords = () => {
  return request.get('/statistic/top-keywords')
}
// 查询浏览的企业
export const getTopSearchedEnterprises = () => {
  return request.get('/statistic/top-enterprises')
}
// 查询评论数
export const getDailyCommentStats = (data = {}) => {
  return request.get('/statistic/daily-comments', {
    params: {
      startDate: data.startDate,
      endDate: data.endDate,
    },
  })
}
// 查询搜索次数
export const getDailyKeyStats = (data = {}) => {
  return request.get('/statistic/daily-keys', {
    params: {
      startDate: data.startDate,
      endDate: data.endDate,
    },
  })
}
